<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<jsp:include page="../fragments/header.jsp">
	<jsp:param name="title" value="New Purchase Order" />
</jsp:include>

<c:choose>
	<c:when test="${empty PORequirements}">
		<p>There are no available PO Requirements</p>
	</c:when>
	<c:otherwise>
		<p>List of PO Requirements</p>
		<br />

		<table class="table table-hover">
			<thead>
				<tr>
					<th>#</th>
					<th>Order Item</th>
					<th>Vendor</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${PORequirements}" var="requirement">
					<tr>
						<td>${requirement.id}</td>
						<td>${requirement.orderItem}</td>
						<td>${requirement.vendor}</td>
					</tr>
				</c:forEach>
			</tbody>
		</table>

		<form action="" method="POST">
			<input type="submit" class="btn btn-default btn-block" value="Create PO">
		</form>
	</c:otherwise>
</c:choose>

<jsp:include page="../fragments/footer.jsp" />